<template>
	<view class="viewbox auto">
		<view class="lis bot d-flex" @click="$toCourses(item.goods_id,all)" v-for="(item,index) in pageData" :key="index">
			<image :src="$imgUrls(item.img)" mode="aspectFill" class="list_img"></image>
			<view class="flex-1 d-flex f-column j-sa">
				<view class="d-flex a-center">
					<!-- xuanStudy -->
					<!-- <view class="tip flexac biStudy"> 
						<text class="tip_txt">必学</text>
						<text class="tip_txt">选学</text>
					</view> -->
					<text class="flex-1 size26 color_33 bold ellipsis">{{item.name}}</text>
				</view>
				<view class="rows ellipsis_2 color_99 size22">{{item.info}}</view>
				<view class="row j-sb a-center">
					<text class="color_66 h7">共{{item.people}}人学习</text>
					<view class="d-flex a-center color_E6" v-if="item.rank">
						<text class="size26">第</text>
						<text class="size36 bold">{{item.rank}}</text>
						<text class="size26">名</text>
					</view>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:'studyList',
		props:['pageData','all'],
		data() {
			return {
				
			}
		},
		methods: {
			tocourse(goods_id){
				if(!this.all) return this.$toCourses(goods_id)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.lis{
		width:100%;
		height: 200rpx;
		padding:30rpx 0;
		box-sizing: content-box;
	}
	.list_img{
		width:264rpx;
		height: 200rpx;
		margin-right: 20rpx;
	}
	.tip{
		border-radius: 8rpx;
		padding:2rpx 4rpx;
		margin-right: 10rpx;
	}
	.biStudy{
		background-color: #FFB346;
	}
	.xuanStudy{
		background-color: #43A0FF;
	}
	.tip_txt{
		color:#ffffff;
		font-size:20rpx;
		zoom:0.9;
	}
</style>
